/* Startup Template For TMR1 */ // Sample Interrupt Handler void interrupt() { // Timer1 Interrupt Handler if (PIR1.TMR1IF == 1) // if the Timer 1 interrupt flag is set... { - Place Your Code Here - PIR1.TMR1IF = 0; // interrupt must be cleared by software PIE1.TMR1IE = 1; // reenable the interrupt } } // Sample Main Setup void main() { // Set Interrupt Enable bits INTCON.TRM0IE = 1; // bit 5 Timer0 Overflow Interrupt Enable // setup the TMR1 configuration registers OPTION_REG.T0CS = 0; // bit 5 TMR0 Clock Source Select bit 0 = Internal Clock (CLKO) 1 = Transition on T0CKI pin OPTION_REG.T0SE = 0; // bit 4 TMR0 Source Edge Select bit 0 = low/high 1 = high/low OPTION_REG.PSA = 1; // bit 3 Prescaler Assignment bit... 0 = Prescaler is assigned to the WDT OPTION_REG.PS2 = 0; // bits 2-0 PS2:PS0: Prescaler Rate Select bits OPTION_REG.PS1 = 0; OPTION_REG.PS0 = 0; //Set global Interrupt Enable bits INTCON.GIE = 1; // global interrupt enable while(1) // endless loop { - Place Your Code Here - } }